import request from '@/utils/request'

// 查询施工队评论列表
export function listComment(query) {
  return request({
    url: '/construction/comment/list',
    method: 'get',
    params: query
  })
}

// 查询施工队评论详细
export function getComment(constructionCommId) {
  return request({
    url: '/construction/comment/' + constructionCommId,
    method: 'get'
  })
}

// 新增施工队评论
export function addComment(data) {
  return request({
    url: '/construction/comment',
    method: 'post',
    data: data
  })
}

// 修改施工队评论
export function updateComment(data) {
  return request({
    url: '/construction/comment',
    method: 'put',
    data: data
  })
}

// 删除施工队评论
export function delComment(constructionCommId) {
  return request({
    url: '/construction/comment/' + constructionCommId,
    method: 'delete'
  })
}

// 导出施工队评论
export function exportComment(query) {
  return request({
    url: '/construction/comment/export',
    method: 'get',
    params: query
  })
}

export function changeCommentStatus(constructionCommId,auditStatus){
  const data = {
    constructionCommId,
    auditStatus
  }
  return request({
    url: '/construction/comment/changeCommentStatus',
    method: 'put',
    data: data
  })
}

